home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / PGUIDE / PROGWOB / PWOEMPL.CLS < prev    next >
Encoding:
Visual Basic class definition  |  1996-11-26  |  1.4 KB  |  60 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "Employee"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = False
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = False
  10. Option Explicit
  11. ' >> Best viewed in Full Module view. <<
  12. '
  13. ' Storage for debug ID number.
  14. Private mlngDebugID As Long
  15. Implements IDebug
  16.  
  17. ' Properties of the Employee class.
  18. Public Name As String
  19. Public Salary As Double
  20.  
  21. ' Private data for the write-once ID property.
  22. Private mstrID As String
  23.  
  24. Property Get ID() As String
  25.     ID = mstrID
  26. End Property
  27. '
  28. ' The first time the ID property is set, the static
  29. '   Boolean is also set.  Subsequent calls do nothing.
  30. '   (It would be better to raise an error, instead.)
  31. Property Let ID(strNew As String)
  32.     Static blnAlreadySet As Boolean
  33.     If Not blnAlreadySet Then
  34.         blnAlreadySet = True
  35.         mstrID = strNew
  36.     End If
  37. End Property
  38.  
  39. Private Sub Class_Initialize()
  40.     mlngDebugID = DebugInit(Me)
  41. End Sub
  42.  
  43. Private Sub Class_Terminate()
  44.     DebugTerm Me
  45. End Sub
  46.  
  47. ' -------- IDebug Implementation --------
  48. '
  49. ' IDebug.DebugID gives you a way to tell
  50. ' ====== -------    objects apart.  It's
  51. '   required by the DebugInit, DebugTerm,
  52. '   and DebugShow debugging procedures
  53. '   declared in modFriend.
  54. '
  55. Private Property Get IDebug_DebugID() As Long
  56.     IDebug_DebugID = mlngDebugID
  57. End Property
  58.  
  59.  
  60.